package com.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {

   public static boolean dateUtil(Date date){
       Date date1 = new Date();//当前时间
       if(date1.getTime() - date.getTime() >= 24*60*60*1000){ //当前时间 减去 上次登录时间>=24
           return true;
       }
       Calendar calendar = Calendar.getInstance();
       Calendar instance = Calendar.getInstance();
       calendar.setTime(date1);
       instance.setTime(date);
       if(calendar.get(Calendar.DATE) !=instance.get(Calendar.DATE)){
           return true;
       }
       return false;
   }
}
